package top.lethelh.jianoa.config.shiro;

import org.springframework.stereotype.Component;

/**
 * @author lh
 * @date 2021/11/20 9:37 上午
 * @desc
 */
@Component
public class ThreadLocalToken {
    private final ThreadLocal<String> tl = new ThreadLocal<>();

    public void setToken(String token) {
        tl.set(token);
    }

    public String getToken() {
        return tl.get();
    }

    public void clear() {
        tl.remove();
    }
}
